let path = require('path');

require('babel-core/register')({
    'presets': [path.join(__dirname, 'node_modules/babel-preset-node7')],
});

process.on('uncaughtException', (err) => {
    let logger = require(`./lib/logger`).default;
    logger.error(err);
});

module.exports = (config, schema) => {
    require(`./lib/koa`).default(config, schema);
    require(`./lib/dnode`).default(config, schema);
}
